package com.lsh.oms.core.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.lsh.oms.core.constant.LoggerConstant;

/**
 * @author peter
 */
public class LoggerUtils {
	
	private static Logger log = LoggerFactory.getLogger(LoggerUtils.class);
	
	public static void saveLog(String str, String level){
		if(LoggerConstant.LOGGER_INFO.equals(level)){
			log.info(str);
		}
		if(LoggerConstant.LOGGER_DEBUG.equals(level)){
			log.debug(str);
		}
		if(LoggerConstant.LOGGER_ERROR.equals(level)){
			log.error(str);
		}
		
	}

	/**
	 * 默认打印info
	 * @param str
	 */
	public static void saveLog(String str) {
		log.info(str);
	}

}
